<!DOCTYPE html>  
<html>  
<head>  
    <title>netty-socketio测试</title>  
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <script src="js/socket.io/socket.io.js"></script>
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script>  
        $(function(){  
            var socket =  io.connect('http://127.0.0.1:9092');  
            //监听名为pushpoint的事件，这与服务端推送的那个事件名称必须一致  
            socket.on("pushpoint", function(data){  
                $('#x').text(data.x);  
                $('#y').text(data.y);
                $('#c').text(data.clientSize);
            });  
        });  
          
    </script>  
</head>  
  
<body>  
      
    <div id="display" style="height:50px;">
        x=<span id="x">0</span>, y=<span id="y">0</span>  <br>
        客户端数量:<span id="c"></span>
    </div>  
  
</body>  
  
</html>  